package me.firstapp.module.shop;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "POINT_RECHARGE_CARD")
public class PointRechargeCard extends BaseEntity {

	private static final long serialVersionUID = 7685573109482226186L;

	// 卡号
	@Column(name = "CARD_NO", length = 50, unique = true, nullable = false)
	private String cardNo;

	// 卡密
	@Column(name = "PASSWORD", length = 50, nullable = false)
	private String password;

	// 积分值
	@Column(name = "POINT_VALUE", columnDefinition = "DECIMAL(11, 2)", nullable = false)
	private Double pointValue;

	// 盐（用于校验积分值是否被外部修改）
	@Column(name = "SALT", length = 100, nullable = false)
	private String salt;

	// 价格
	@Column(name = "PRICE", columnDefinition = "DECIMAL(11, 2)", nullable = false)
	private Double price;

	// 使用状态,0为未使用，1为在售(正在销售中)，2为已售未充值(在后端将已售且未充值的改为此状态)，3为已售已充值
	@Column(name = "USE_STATUS", columnDefinition = "TINYINT", nullable = false)
	private Integer useStatus;

	// 0为停用，1为启用（启用的时候设置开始日期，截止日期）
	@Column(name = "STATUS", columnDefinition = "TINYINT", nullable = false)
	private Integer status;

	// 截止日期，该日期以后无法使用
	@Column(name = "END_DATE", columnDefinition = "DATETIME", nullable = true)
	private Date endDate;

	// 开始日期，该日期以前无法使用
	@Column(name = "START_DATE", columnDefinition = "DATETIME", nullable = true)
	private Date startDate;

	// 添加时间
	@Column(name = "CREATE_TIME", columnDefinition = "DATETIME", nullable = false)
	private Date createTime;

	// 充值时间
	@Column(name = "RECHARGE_TIME", columnDefinition = "DATETIME")
	private Date rechargeTime;

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Double getPointValue() {
		return pointValue;
	}

	public void setPointValue(Double pointValue) {
		this.pointValue = pointValue;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Integer getUseStatus() {
		return useStatus;
	}

	public void setUseStatus(Integer useStatus) {
		this.useStatus = useStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public Date getRechargeTime() {
		return rechargeTime;
	}

	public void setRechargeTime(Date rechargeTime) {
		this.rechargeTime = rechargeTime;
	}

}
